package com.ruoyi.common.imgconflate.jai;

import lombok.Getter;

import java.awt.*;

/**
 * 文本内容配置
 */
@Getter
public class TextConfig {
    /**
     * 文本内容
     */
    private final String text;
    /**
     * 字体库
     */
    private final String typeface;
    /**
     * 是否加粗
     */
    private final Boolean boldFont;
    /**
     * 字号
     */
    private final Integer fontSize;
    /**
     * 字体颜色
     */
    private final Color fontColor;
    /**
     * 行间距
     */
    private final Integer lineSpacing;
    /**
     * 字间距
     */
    private final Integer wordSpace;

    /**
     * x轴坐标
     */
    private final Integer x;
    /**
     * y轴坐标
     */
    private Integer y;

    /**
     * 构造函数
     *
     * @param text 文本内容
     * @param typeface 字体库
     * @param boldFont 是否加粗
     * @param fontSize 字号
     * @param fontColor 字体颜色
     * @param lineSpacing 行间距
     * @param wordSpace 字间距
     * @param x x轴坐标
     * @param y y轴坐标
     */
    public TextConfig(String text, String typeface, Boolean boldFont, Integer fontSize, Color fontColor,
                      Integer lineSpacing, Integer wordSpace, Integer x, Integer y) {
        this.text = text;
        this.typeface = typeface;
        this.boldFont = boldFont;
        this.fontSize = fontSize;
        this.fontColor = fontColor;
        this.lineSpacing = lineSpacing;
        this.wordSpace = wordSpace;
        this.x = x;
        this.y = y;
    }

    /**
     * 构造函数
     *
     * @param text 文本内容
     * @param typeface 字体库
     * @param boldFont 是否加粗
     * @param fontSize 字号
     * @param fontColor 字体颜色
     * @param lineSpacing 行间距
     * @param wordSpace 字间距
     * @param x x轴坐标
     */
    public TextConfig(String text, String typeface, Boolean boldFont, Integer fontSize, Color fontColor,
                      Integer lineSpacing, Integer wordSpace, Integer x) {
        this.text = text;
        this.typeface = typeface;
        this.boldFont = boldFont;
        this.fontSize = fontSize;
        this.fontColor = fontColor;
        this.lineSpacing = lineSpacing;
        this.wordSpace = wordSpace;
        this.x = x;
    }
}
